package com.wanxi.dao;

import com.wanxi.model.Permission;
import com.wanxi.model.UserModel;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 杨金乾
 */
@Mapper
public interface UserDao extends BaseDao<UserModel> {
    /**
     * 查询用户名和密码
     * @param model
     * @return
     */
    UserModel findByUsernameAndPassword(UserModel model);

    /**
     * 修改密码
     * @param model
     * @return
     */
    int updatePassword(UserModel model);

    List<UserModel> getUserByName(String username);

    List<Permission> getPermissionByUserId(Long id);
}
